#pragma once

#include "Mysql.h"

namespace Database
{

class AFX_EXT_CLASS RouteRow
{
public:
	RouteRow(void);

	~RouteRow(void);

public:
	std::string getID() const;

	void setID(const std::string &id);

	std::string getName() const;

	void setName(const std::string &ne);

	std::string getDirection() const;

	void setDirection(const std::string &dn);

private:
	std::string	_id;
	std::string _name;
	std::string _direction;
};

class AFX_EXT_CLASS RouteTable
	: public Table
{
public:
	RouteTable();

	~RouteTable();

public:
	bool insert(const RouteRow &rr);

	bool select(std::list<RouteRow> &rrs);

	bool selectOrderByNmae(std::list<RouteRow> &rrs);

	bool updateByID(const RouteRow &rr);

	bool deleteByID(const RouteRow &rr);

private:
	bool select(const std::string &sql, std::list<RouteRow> &rrs);
};

}